g05fdf

g05fdf © Numerical Algorithms Group, 2002.

Purpose

G05FDF Generates a vector of pseudo-random numbers from a Normal distribution

Synopsis

[x] = g05fdf(a,b,n)

Description

 
 The distribution has PDF (probability distribution function)
 
                                    (       2)
                            1       (  (x-a) )
                   f(x)= --------exp(- ------).
                            _____   (     2  )
                         b\/2(pi)   (   2b   )
 
 The routine uses the Box-Muller method.
 
 The routine does not generate the same pseudo-random numbers as 
 would n consecutive calls of G05DDF, because G05DDF uses a 
 different method. However on vector-processing machines G05FDF is
 likely to be much faster.
 

Parameters

g05fdf

Required Input Arguments:

a                                     real
b                                     real
n                                     integer

Output Arguments:

x (n)                                 real